<?php
include "config.php";//apikey配置文件
include "jd/JdClient.php";//请求文件
include "jd/RequestCheckUtil.php";//请求文件
include "jd/request/UnionOpenPositionQueryRequest.php";//接口参数

$c = new JdClient();
$c->appKey = $ApiConfig["AppKey"];
$c->appSecret = $ApiConfig["AppSecret"];

$req = new UnionOpenPositionQueryRequest();
$positionReq= array();
$positionReq["unionId"]=1000130713;
$positionReq["key"]="e4209eac5db9f8e22230bde9131c110465266bd557235304072c9f99fd4b95d4f9e40ad2081a2efe";
$positionReq["unionType"]=4;//3：私域推广位，上限5000个，不在联盟后台展示，无对应 PID；4：联盟后台推广位，上限500个，会在推客联盟后台展示，可用于内容平台推广
$positionReq["pageIndex"]=1;
$positionReq["pageSize"]=20;

$req->setPositionReq($positionReq);
$resp = $c->execute($req);
print_r($resp);